<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>会员中心-一览网</title>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/member.css">
    <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="js/layui/layui.all.js"></script>
</head>
<body>
<header>
    <div class="m_top">
        <div class="m_top_bar">
            <div class="m_top_login fl">
                <p><b>13814503433</b> <img src="images/right.png">  <a href="member_index.html">会员中心</a> | <a href="">退出</a></p>
            </div>
            <div class="m_top_search fl">
                <form method="get" action="">
                    <div class="m_search_warp">
                        <i class="ico ico-zoom"></i>
                        <input type="text" value="" placeholder="请输入化学品的中文名，英文名或CAS号" class="m_search_txt">
                    </div>
                    <input type="submit" value="搜索" class="m_search_sub">
                </form>
            </div>
            <div class="m_top_nav rg_menu fr">
                <ul>
                    <li><a href="index.html">平台首页</a><span>|</span></li>
                    <li><div class="show_qrcode"> <img src="images/er-icon.png" class="simple">二维码 <span>|</span><div class="tip-qrcode"><img src="images/qrcode.jpg"></div></div></li>
                    <li class="kf"><a href="javascript:;" class="td">客服中心</a><span>|</span>
                        <div class="kf_child hidden">
                            <ul>
                                <li><a href="help.html">帮助中心</a> </li>
                                <li><a href="feedback.html">反馈意见</a> </li>
                                <li><a href="contact.html">联系我们</a> </li>
                            </ul>
                        </div>
                    </li>
                    <li><a href=""  class="td">网站地图</a></li>
                </ul>
            </div>
        </div>
    </div>
</header>

<div class="clearfix"></div>

<div class="contain pt20">
    <div class="m_content">
        <div class="m_menu fl">
            <div class="mt_menu">
                <dl>
                    <dt class="mn1">会员首页</dt>
                    <dd><a href="member_index.html">会员首页</a></dd>
                </dl>
                <dl>
                    <dt class="mn2">采购中心</dt>
                    <dd><a href="member_buy_add.html">新增求购</a></dd>
                    <dd>
                        <a href="member_buy_list.html">求购管理</a>
                        <ol class="hidden">
                            <li><a href="member_buy_list.html">已报价</a></li>
                            <li><a href="member_buy_list_not.html">未报价</a></li>
                            <li><a href="member_buy_list_cancel.html">取消求购</a></li>
                            <li><a href="member_buy_list_lost.html">暂时缺货</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_order_list.html">采购订单</a></dd>
                </dl>
                <dl>
                    <dt class="mn3">销售中心</dt>
                    <dd><a href="member_goods_add.html">上传目录</a></dd>
                    <dd><a href="member_goods_list.html">商品管理</a>
                        <ol>
                            <li class="on"><a href="member_goods_list.html">已上架</a></li>
                            <li><a href="member_goods_list_down.html">已下架</a></li>
                            <li><a href="member_goods_list_check.html">待审核</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_inquiry_list.html">询单管理</a>
                        <ol class="hidden">
                            <li><a href="member_inquiry_list.html">未报价</a></li>
                            <li><a href="member_inquiry_list_had.html">已报价</a></li>
                            <li><a href="member_inquiry_list_abandon.html">已放弃</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_sell_list.html">销售订单</a></dd>
                </dl>
                <dl>
                    <dt class="mn4">账号管理</dt>
                    <dd><a href="member_account_attentions.html">我的关注</a></dd>
                    <dd><a href="member_account_informations.html">账号信息</a></dd>
                    <dd><a href="member_account_transaction.html">交易资料</a></dd>
                </dl>
            </div>
        </div>
        <div class="m_con fr">
            <div class="b-bar">
                <div class="b-title"><span>已上架商品</span></div>
                <div class="b-con">
                    <div class="b-block-search">
                        <form action="" method="post">
                            <input type="text" id="search_params_chemical_info" class="form_input wd300 search-input" name="keywords" placeholder="请输入产品信息" value="" autocomplete="off">
                            <select name="range" id="search_params_time_range" class="form_select">
                                <option value="0" selected="">全部</option>
                                <option value="3">近三天</option>
                                <option value="7">近一周</option>
                                <option value="30">近一月</option>
                                <option value="90">近三月</option>
                            </select>
                            <input type="submit" class="submit_btn wd100" value="查 询">
                        </form>
                    </div>

                    <div class="flex b-block-status mt30">
                        <div></div>
                        <div>
                            商品总数：<span class="red mr10">61</span>已选择 <span class="choose_num red bold">0</span> 件商品 <a href="javascript:void(0);" class="blue ml10" id="many_out_of_stock">批量下架</a>
                        </div>
                    </div>

                    <div class="flex b-block_list mt20 mb10">
                        <table class="bz_table">
                            <thead>
                                <tr>
                                    <th><input type="checkbox" class="select_all"></th>
                                    <th>产品名称</th>
                                    <th>CAS</th>
                                    <th>上架时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><input type="checkbox" value="2968052" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968052)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968053" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968053)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968054" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968054)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968055" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968055)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968056" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968056)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968057" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968057)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968058" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968058)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968059" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968059)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968062" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968062)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968072" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968072)">下架</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td><input type="checkbox" value="2968082" name="checkId"></td>
                                    <td>
                                        <a href="product_detail.html" class="blue" target="_blank">2-苄氧基- 3-溴-5-甲基苯基硼酸</a>
                                    </td>
                                    <td>
                                        <a href="product_detail.html" target="_blank" class="blue">870777-20-1</a>
                                    </td>
                                    <td>2020-06-05 10:54:07</td>
                                    <td>
                                        <a href="javascript:;" class="blue" onclick="out_of_stock(2968082)">下架</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="clearfix"></div>
                    <div class="paging">
                        <ul class="pagination">
                            <li class="page-item disabled"><span class="page-link">上页</span></li>
                            <li class="page-item active"><span class="page-link">1</span></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=2">2</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=3">3</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=4">4</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=5">5</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=6">6</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=7">7</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=8">8</a></li>
                            <li class="page-item disabled"><span class="page-link">...</span></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=188">188</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=189">189</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=2" rel="next">下页</a></li>
                        </ul>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<footer>
    <div class="footer">
        <div class="foot_con">
            <div class="ft_left">
                <div class="ft_service">
                    <img src="images/service.png">
                    <p class="yellow fz16 bold mt10">电话：025-66028182</p>
                    <p class="fz16 mt10">QQ：2850281398</p>
                    <p class="fz16 mt10">工作时间 8:30 - 17:30</p>
                </div>
            </div>
            <div class="ft_center">
                <dl>
                    <dt>新手上路</dt>
                    <dd><a href="">用户注册</a></dd>
                    <dd><a href="">隐私声明</a></dd>
                    <dd><a href="">使用须知</a></dd>
                    <dd><a href="">协议条款</a></dd>
                </dl>
                <dl>
                    <dt>联系我们</dt>
                    <dd><a href="">关于我们</a></dd>
                    <dd><a href="">联系我们</a></dd>
                    <dd><a href="">合作伙伴</a></dd>
                    <dd><a href="">通知公告</a></dd>
                </dl>
                <dl>
                    <dt>售后服务</dt>
                    <dd><a href="">开票服务</a></dd>
                    <dd><a href="">退换货服务</a></dd>
                    <dd><a href="">用户反馈</a></dd>
                    <dd><a href="">发货方式</a></dd>
                </dl>
                <dl>
                    <dt>帮助中心</dt>
                    <dd><a href="">售后政策</a></dd>
                    <dd><a href="">退换货说明</a></dd>
                    <dd><a href="">退款说明</a></dd>
                    <dd><a href="">产品目录</a></dd>
                </dl>
            </div>
            <div class="ft_right">
                <div class="ft_qrcode">
                    <img src="images/qrcode.jpg">
                    <p>关注公众号</p>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="copyright">
            <p>版权所有 Copyright(C)2020 南京一览生物科技有限公司 <a href="http://www.beian.miit.gov.cn/" style="color: #777272;">苏ICP备20017967号-1</a></p>
        </div>
    </div>
    <div class="clearfix"></div>
</footer>
<div class="hidden" id="template">
    <div class="flex b_inq_item">
        <div class="flex b_inq_item_c">
            <div><input class="form_input" alis="input_cas" name="inquiry[cas][]" placeholder="请输入CAS号码" type="text" value=""></div>
            <div>
                <input class="form_input wd80" alis="input_package1" name="inquiry[package1][]" placeholder="数量1" type="number" value="" min="0" autocomplete="off">
                <select class="form_select" name="inquiry[package1_unit][]" alis="input_package1_unit" tabindex="-1">
                    <option value="">单位</option>
                    <option value="1">mg</option>
                    <option value="2">g</option>
                    <option value="3">kg</option>
                    <option value="4">ml</option>
                    <option value="5">l</option>
                    <option value="6">ton</option>
                </select>
            </div>
            <div>
                <input class="form_input wd90" alis="input_package2" name="inquiry[package2][]" type="number" value="" min="0" placeholder="数量2(选填)" autocomplete="off">
                <select class="form_select" name="inquiry[package2_unit][]" alis="input_package2_unit" tabindex="-1">
                    <option value="">单位</option>
                    <option value="1">mg</option>
                    <option value="2">g</option>
                    <option value="3">kg</option>
                    <option value="4">ml</option>
                    <option value="5">l</option>
                    <option value="6">ton</option>
                </select>
            </div>
            <div><textarea class="form_textarea" name="inquiry[note][]" cols="20" rows="2"></textarea></div>
            <div><a href="javascript:void(0);" class="blue_btn" name="delete">删除</a></div>
        </div>
        <div class="b_inq_name">二碳酸二叔丁酯Di-tert-butyl dicarbonate</div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    // 全选
    $(".select_all").click(function(){
        if($(this).prop('checked')){
            $(".select_all").prop("checked", true);
            $(":checkbox[name='checkId']").prop("checked", true);
        }else{
            $(".select_all").prop("checked", false);
            $(":checkbox[name='checkId']").prop("checked", false);
        }
        set_num();
    });
    function set_num(){
        $(".choose_num").html($(":checkbox[name='checkId']:checked").length);
    }

    //下架
    function out_of_stock(id) {
        layer.confirm('您是否确认下架该商品！', {
            btn: ['确定','取消'], //按钮
            skin: 'layui-layer-lan',
            anim: 4
        }, function(){

            $.ajax({
                url: "",
                data:{ "_token": "", "id": id, "opt":"single"},
                type: 'post',
                cache: false,
                dataType: 'json',
                success: function () {

                },
                error: function () {
                    layer.msg('系统异常，请联系客服人员！', {icon: 1});
                }
            })
        });
    }

    $("#many_out_of_stock").click(function(){

        if($("input[name='checkId']:checked").length == 0){
            layer.alert('请至少选中一个商品！', {icon: 2});
            return;
        }

        layer.confirm('您是否确认批量下架选中商品！', {
            btn: ['确定','取消'] //按钮
        }, function(){

            $.ajax({
                url: "",
                data:{ "_token": "", "id": id, "opt":"single"},
                type: 'post',
                cache: false,
                dataType: 'json',
                success: function () {

                    var checkID = [];
                    $("input[name='checkId']:checked").each(function(i){//把所有被选中的复选框的值存入数组
                        checkID[i] =$(this).val();
                    });

                    $.ajax({
                        url: "http://old.chemicalseller.cn/member/sell/products",
                        data:{ "_token": "fYVGQa2BmZLQPqEy5IBWW4UVXCPsZDhWceMS0aBF", "ids": checkID, "opt":"batch"},
                        type: 'post',
                        cache: false,
                        dataType: 'json',
                        success: function () {
                            window.location.href = "http://old.chemicalseller.cn/member/sell/products";
                        },
                        error: function () {
                            layer.msg('系统异常，请联系客服人员！', {icon: 1});
                        }
                    })

                },
                error: function () {
                    layer.msg('系统异常，请联系客服人员！', {icon: 1});
                }
            })
        });
    });
</script>